    <form id="inputForm" action="/admin/booklet/save" method="post" enctype="multipart/form-data">
		<input name="id" id="id" type="hidden" value="<?php echo $booklet->id;?>">
      <div class="row clearfix">
        <label for="name">书名:</label>
        <p><span>
		<input name="name" maxlength="100" id="name" class="inputs med required" value="<?php echo $booklet->name; ?>">
          </span><span id="NameError"></span></p>
      </div>
      <div class="row clearfix">
        <label for="desc">描述:</label>
        <p><span>
		<textarea id="description" name="description" class="inputs med long required" rows="10" ><?php echo $booklet->description;?></textarea>
          </span></p>
      </div>
      <div class="row clearfix">
        <label for="desc">类别:</label>
        <select id="categorySelect[]" name="categorySelect[]" style="width:200px" multiple>
<?php
	$booklet_category_array = $booklet->categories->find_all();
	foreach ($category_list as $category)
	{
?>
		<option value ="<?php echo $category->id; ?>" 
<?php 
		foreach ($booklet_category_array as $booklet_category)
		{
			if ($booklet_category->id == $category->id)
			{
				echo 'selected';
				continue;
			}
		}
?>
>
<?php 
		echo $category->name; 
?>
		</option>
<?php
	}
?>
        </select>
      </div>
<!--
      <div class="row clearfix">
        <label for="preview">缩略图 :</label>
        <input name="imgfile" type="file" accept="image/*">
      </div>
-->
		<div class="row clearfix">
	<input type="checkbox" name="lock" id="lock" 
<?php
	if ($booklet->lock == "on")
	{
		echo 'checked="checked"';
	}
?>
	>加锁<br>
       </div>
      <div class="row clearfix">
        <input type="submit" name="submitBtn" id="submitBtn" class="submit" value="Update">
      </div>
    </form>
